<?php
$this->load->helper('html'); 
echo doctype('xhtml11');

$username = array(
	'name'	=> 'txtUsername',
	'id'    => 'txtUsername',
	'size'	=> 20,
	'value' => set_value('txtUsername',$lastuser),
  'class' => 'text'
);
$password = array(
	'name'	=> 'txtPassword',
	'id'    => 'txtPassword',
	'size'	=> 20,
  'class' => 'text'
);
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  <head>
    <link href="favicon.gif" rel="shortcut icon" type="image/gif" />
    <?php echo meta('content-type', 'text/html; charset=utf-8', 'equiv'); ?>
    <?php echo link_tag('css/prunus-out.php') . "\n"; ?>
    <title><?php echo $this->prunuslib->getCurrentPageTitle(); ?></title>
    <script type="text/javascript" src="<?php echo base_url(); ?>javascripts/jquery.min.js"></script>
    <script type="text/javascript">
    //<![CDATA[
      $(document).ready(function(){ 
        $('#txtUsername').focus(); 
      });
    //]]>
    </script>
  </head>

  <body>
    <div id="container">
      <div id="header"></div>
      <div id="body">
<?php if ($logueado): ?>
        <p><?php echo anchor('logout','logout'); ?></p>
<?php else: ?>
        <div id="loginArea">
          <?php echo form_open($this->uri->uri_string(), array('id' => 'frmLogin')); ?>
            <table summary="login">
              <tr>
                <td class="caption"><?php echo lang('pr_Usuario'); ?></td>
                <td><?php echo form_input($username)?><?php if (form_error($username['name']) != "") { echo "<span class=\"frmError\">" . form_error($username['name']) . "</span>"; } ?><?php if ($error!="") { echo "<span class=\"frmError\">$error</span>"; } ?></td>
              </tr>
              <tr>  
                <td class="caption"><?php echo lang('pr_Contrasena'); ?></td>
                <td><?php echo form_password($password)?><?php if (form_error($password['name']) != "") { echo "<span class=\"frmError\">" . form_error($password['name']) . "</span>"; } ?></td>
              </tr>
              <tr>  
                <td class="caption" colspan="2"><?php echo form_submit(array('id' => 'frmSubmit','name' => 'frmSubmit','class' => 'submit'), lang('pr_Ingresar')); ?></td>
              </tr>
            </table>
          <?php echo form_close(); ?>
        </div>

        <div id="loading"><?php echo lang('pr_Ingresando'); ?></div>
        <div id="campos"><?php echo lang('pr_TodosCamposObligatorios'); ?></div>
<?php endif; ?>

        <div id="footer">
          <a href='http://www.7dedos.com'>&copy;2009 7dedos</a> | 
<?php if ($this->prunuslib->idioma!='spanish') echo anchor('prunus/idioma/change/spanish/login', lang('pr_CambiaIdiomaSpanish'));?>
<?php if ($this->prunuslib->idioma!='english') echo anchor('prunus/idioma/change/english/login', lang('pr_CambiaIdiomaEnglish'));?>
          
        </div>
      </div>
    </div>
  </body>
</html>